#include <stdio.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include "debug.h"

int main(int args, char *argv[])
{
	FILE *fp;
	unsigned char ch;
	char path[80] = {0};
	snprintf(path, sizeof(path), "/proc/4182/cmdline");


	DEBUG("path is %s\n", path);
	
	if((fp = fopen(path, "r")) == NULL )
	{
		perror("fopen");
		return 0;
	}

	while(!feof(fp))
	{
		ch = fgetc(fp);
		printf(" %c %d \n", ch, ch);
	}

	fclose(fp);
	return 0;

}
